**Figures
clear
clear matrix
clear mata
cap log close
************************************************************************************
**change directory here
* DIRECTORY ROADMAP
sysdir set PLUS C:\ado\plus\c
************************************************************************************

global dir1 C:\Users\hab55\Dropbox\Second_paper_Ghana\2023_EDCC_Price\Data
global dir2 C:\Users\hab55\Dropbox\Second_paper_Ghana\2023_EDCC_Price\Do
global dir3 C:\Users\hab55\Dropbox\Second_paper_Ghana\2023_EDCC_Price\Output

///////////////////////////////////////////////////////////////////////////////
***Figure B.3

use "$dir1\land_coverd_by_cocoa_ghana.dta", clear

label define ROB1 1 "Western" 2 "Central" 3 "Greater Accra" 4 "Volta" 5 "Eastern" 6 "Ashanti" 7 "Brong Ahafo" 8 "Northern" 9 "Upper West" 10 "Upper East"

label value ROB ROB1

////////////////////////////////////////////////////////////
gen pct_cocoa_land= cocoa_land*100
label var pct_cocoa_land "Percent of land covered by Cocoa"

graph hbar pct_cocoa_land , over(ROB, sort(pct_cocoa_land) )  ytitle("Percent of land covered by Cocoa") blabel(total) 

graph export "$dir3\Fraction_farm_area_under_Cocoa.png", as(png) replace width(3500)

//////////////////////////////////////////////////////////////////////

**Figure B.1

use "$dir1\cocoa_producer_world_price.dta", clear 

twoway line price year, lcolor(black) lpattern( solid) ytitle("ln(Real Cocoa Producers Price-Ghana cedi)") || line int_price year , lcolor(black) lpattern( dash) yaxis(2) ytitle("ln(Real Cocoa International Price-USD)", axis(2))  legend(pos(6)rows(2)  cols(2))

graph export "$dir3\Producer_International_price.png", as(png) replace width(3500)


/////////////////////////////////////////////////////////////////////////////////
***Figure B.2

use "$dir1\cocoa_producer_world_price.dta", clear 

keep if year>=1987
label var year "Year"
sum price

tset year
twoway (tsline price), yline (13.79825) xline(1987 1988 1989 1991 1992 1998 1999 2005 2006 2012 2013) ytitle("ln(Real Cocoa Producers Price)")

graph export "$dir3\Producer_price_1987_2013.png", as(png) replace width(3500)

//////////////////////////
***Figure D.1
use "$dir1\cocoa_producer_world_price.dta", clear 


keep if year>=2001
label var year "Year"
sum price
tset year
twoway (tsline price), yline (14.12294 ) xline(2003 2005 2006 2009 2010 2012 2013) ytitle("ln(Real Cocoa Producers Price)")

graph export "$dir3\Producer_price_2001_2013.png", as(png) replace width(3500)
